<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html>
  <head>
    <title>ocamljs 0.1 - intro</title>
  </head>
  <body>
<p>This is ocamljs, a Javascript back-end for ocamlc, version 0.1.</p>

<h3>What works (partial list)</h3>

<ul>
  <li>The core of OCaml including the module system</li>
  <li>Much of the standard library (including Printf)</li>
  <li>Tail recursion</li>
  <li>Generated code runs in Firefox/SpiderMonkey</li>
</ul>

  <p>We are using ocamljs for production work at Skydeck, but
    implementation has been on an as-needed basis.</p>

<h3>What doesn't work or is unknown to work (partial list)</h3>

<ul>
  <li>The object system</li>
  <li>Floats need some work</li>
  <li>int64</li>
  <li>Much of the standard library</li>
  <li>Untested in other Javascript implementations</li>
</ul>

<h3>Contributing</h3>

  <p>If you find a bug, it would be very helpful to get a test case
    that produces different behavior from regular OCaml (see test/ for
    examples). Other contributions are very welcome as well. For now
    I'd like to shoot for getting as much of OCaml and the standard
    library working as possible, then focus on performance.</p>

<h3>Future plans</h3>

<ul>
  <li>Compactify generated code</li>
  <li>Dead code elimination</li>
  <li>Improve code generation, inlining</li>
  <li>CPS/closure-convert to first-order rep? Threads?</li>
  <li>Something like Google Web Toolkit</li>
  <li>Port the toplevel to ocamljs for a 'try OCaml' page</li>
</ul>

<h3>See also</h3>

  <p><a href="http://www.itu.dk/people/mael/smltojs/">http://www.itu.dk/people/mael/smltojs/</a></p>

<h3>Acknowledgement</h3>

  <p>Thanks to Skydeck for permitting me to release ocamljs.</p>

  <p>Jake Donham / <a href="mailto:jake.donham@skydeck.com">jake.donham@skydeck.com</a></p>

</body>
</html>
